#include "uart.h"
#include "clock.h"
#include "led.h"
#include "types.h"

void delay(u32 t)
{
	u32 t2 = 0xFFFF;
	while (t--)
		for (; t2; t2--);
}

int main()
{
	u32 t = 10000;
	
	clock_init();
	led_init();
	uart_init();
	
	led_write(0,LED_ON);


	puts("\n\nUart Test for printf");
	while (1)
	{
		printf("t = %d (0x%X)\n", t, t);
		t++;
		delay(500000);
		led_toggle(0);
	}
	return 0;
}
